package com.lxk.index.banner.controller.app;


import com.lxk.index.banner.domain.bo.IndexBannerBo;
import com.lxk.index.banner.domain.vo.IndexBannerVo;
import com.lxk.index.banner.service.IIndexBannerService;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.constant.Constants;
import org.dromara.common.core.domain.R;
import org.dromara.common.core.validate.QueryGroup;
import org.dromara.common.tenant.helper.TenantHelper;
import org.dromara.common.web.core.BaseController;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * APP轮播图接口
 *
 * @author ruoyi
 * @date 2022-04-24
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/app/banner")
public class AppBannerController extends BaseController {

    private final IIndexBannerService iCommonBannerService;

    /**
     * 查询轮播图管理列表
     */
    @GetMapping("/list")
    public R<List<IndexBannerVo>> list(@Validated(QueryGroup.class) IndexBannerBo bo) {
        bo.setStatus(Constants.SUCCESS);
        List<IndexBannerVo> commonBannerVos = iCommonBannerService.queryList(bo);
        return R.ok(commonBannerVos);
    }


}
